package lab02.test29;

public class Test {
    public static void main(String[] args) {
        int[] number = new int[5];
        number[0] = 12;
        number[1] = 23;
        number[2] = 45;
        number[3] = 55;
        number[4] = 56;


        try {
            //有可能出错的代码
            System.out.println(number[5]);
        } catch (ArrayIndexOutOfBoundsException e) {
            //1.出的什么错
            //2.出错怎么处理
            System.out.println("超出范围！");
        } finally {
            System.out.println("不管怎么错都会执行的代码！");
        }
    }
}
